package com.woniuxy.yoga.business.model.form.businessaccount;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
@ApiModel("商家注册操作参数对象")
public class BusinessRegisterForm {
    @ApiModelProperty("手机号")
    @Pattern(regexp = "^1[3456789]\\d{9}$", message = "手机号格式不正确")
    private String accountPhone;
    @ApiModelProperty("验证码")
    @NotBlank
    private String code;
    @NotBlank
    @ApiModelProperty("用户名")
    private String accountName;
    @ApiModelProperty("密码")
    @NotBlank
    private String accountPassword;
    @ApiModelProperty("真实姓名")
    @NotBlank
    private String accountRealname;
    @ApiModelProperty("身份证")
    @NotBlank
    @Pattern(regexp = "[1-9][0-9]{5}(19\\d{2}|20[0-1]\\d|202[1-3])((0[13578]|1[02])(0[1-9]|[1-2]\\d|3[0-1])|(0[469]|11)(0[1-9]|[1-2]\\d|30)|02(0[1-9]|1\\d|2\\d))\\d{3}(\\d|X)", message = "身份证不合法")
    private String accountIdcard;
}
